package com.csu.backmanagesys.Service.impl;

import com.csu.backmanagesys.Domain.Order;
import com.csu.backmanagesys.Mapper.OrderMapper;
import com.csu.backmanagesys.Service.OrderService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {


    @Resource
    private OrderMapper OrderMapper;
    @Override
    public List<Order> selectOrder(){
        return OrderMapper.selectOrder();
    }
    @Override
    public  List<Order> selectOrderById(String orderId){
        return OrderMapper.selectOrderById(orderId);
    };

    @Override
    public List<Order> selectOrderStatus(String orderStatus){
       return OrderMapper.selectOrderStatus(orderStatus);
    };

    @Override
    public List<Order> fuzzySelectOrder(String param){
        return OrderMapper.fuzzySelectOrder(param);
    }
    @Override
    public  void updateOrderStatus(String status,int id){
        OrderMapper.updateOrderStatus(status,id);
    };

    @Override
    public void deleteOrder(String orderId){
        OrderMapper.deleteOrder(orderId);
    }

    @Override
    public void updateOrder(Order order) {
        OrderMapper.updateOrder(order);
    }


}
